#cs ----------------------------------------------------------------------------

 AutoIt Version: 3.2.10.0
 Author:         myName

 Script Function:
	Template AutoIt script.

#ce ----------------------------------------------------------------------------

Func Grenade_Button()

	$Grenade_data = GUICtrlRead($Grenade_Delay_1)
	IniWrite ( "attackhack.ini", "Grenade", "throwdelay", $Grenade_data)

EndFunc

Func Grenade1()

	GUICtrlSetState($Grenade_Label_1, $GUI_ENABLE)
	GUICtrlSetState($Grenade_Label_2, $GUI_DISABLE)
	GUICtrlSetState($Grenade_Label_3, $GUI_DISABLE)
	GUICtrlSetState($Grenade_Label_4, $GUI_DISABLE)
	GUICtrlSetState($Grenade_Label_5, $GUI_DISABLE)
	$special = "1"
	IniWrite ( "attackhack.ini", "Grenade", "specials", $special)
	
EndFunc

Func Grenade2()
	GUICtrlSetState($Grenade_Label_1, $GUI_DISABLE)
	GUICtrlSetState($Grenade_Label_2, $GUI_ENABLE)
	GUICtrlSetState($Grenade_Label_3, $GUI_DISABLE)
	GUICtrlSetState($Grenade_Label_4, $GUI_DISABLE)
	GUICtrlSetState($Grenade_Label_5, $GUI_DISABLE)
	$special = "2"
	IniWrite ( "attackhack.ini", "Grenade", "specials", $special)
	
EndFunc

Func Grenade3()
	GUICtrlSetState($Grenade_Label_1, $GUI_DISABLE)
	GUICtrlSetState($Grenade_Label_2, $GUI_DISABLE)
	GUICtrlSetState($Grenade_Label_3, $GUI_ENABLE)
	GUICtrlSetState($Grenade_Label_4, $GUI_DISABLE)
	GUICtrlSetState($Grenade_Label_5, $GUI_DISABLE)
	$special = "3"
	IniWrite ( "attackhack.ini", "Grenade", "specials", $special)
	
EndFunc

Func Grenade4()
	GUICtrlSetState($Grenade_Label_1, $GUI_DISABLE)
	GUICtrlSetState($Grenade_Label_2, $GUI_DISABLE)
	GUICtrlSetState($Grenade_Label_3, $GUI_DISABLE)
	GUICtrlSetState($Grenade_Label_4, $GUI_ENABLE)
	GUICtrlSetState($Grenade_Label_5, $GUI_DISABLE)
	$special = "4"
	IniWrite ( "attackhack.ini", "Grenade", "specials", $special)
	
EndFunc

Func Grenade5()
	GUICtrlSetState($Grenade_Label_1, $GUI_DISABLE)
	GUICtrlSetState($Grenade_Label_2, $GUI_DISABLE)
	GUICtrlSetState($Grenade_Label_3, $GUI_DISABLE)
	GUICtrlSetState($Grenade_Label_4, $GUI_DISABLE)
	GUICtrlSetState($Grenade_Label_5, $GUI_ENABLE)
	$special = "5"
	IniWrite ( "attackhack.ini", "Grenade", "specials", $special)
	
EndFunc

Func grenade()
	If (WinActive("Pirates")) Then
		$grenadeinfo = IniReadSection("attackhack.ini", "grenade" )
		HotKeySet("{F5}")
		$activeWeapon = 5
		Sleep(1000)
		Send("{F5}")
		HotKeySet("{F5}", "idle")
	
		Send("{LCTRL}")
		Sleep(1000)
		Send("{LCTRL}")
		Sleep(1000)	
		Send($grenadeinfo[1][1])
		
		While 1
			If (WinActive("Pirates")) Then
				Send("{LCTRL}")
				Sleep($grenadeinfo[3][1])
			EndIf
		WEnd
	EndIf
EndFunc